{% if not owner_udoc %}
  {% set owner_udoc = udoc %}
{% endif %}
{% if tdoc %}
  {% if tdoc.rule == 'homework' %}
    {% include "partials/problem_sidebar_homework.html" %}
    {% include "partials/homework_sidebar.html" %}
  {% else %}
    {% include "partials/problem_sidebar_contest.html" %}
    {% include "partials/contest_sidebar.html" %}
  {% endif %}
{% else %}
  {% include "partials/problem_sidebar_normal.html" %}
{% endif %}
